package com.matrixlearning.utils;


import com.matrixlearning.pojo.User;

public class UserThreadLocal {
    /**
     * Auther sun
     * DATE 2022/11/17 0:21
     * VERSION 1.0
     */
    private static final ThreadLocal<User> local = new ThreadLocal<>();

    private UserThreadLocal() {

    }

    public static void set(User user) {
        local.set(user);
    }

    public static User get() {
        return local.get();
    }
}
